package cn.lngaosu.lwyd.framework.mybatis.config;

import com.baomidou.mybatisplus.core.injector.AbstractMethod;
import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector;
import com.baomidou.mybatisplus.core.metadata.TableInfo;
import cn.lngaosu.lwyd.framework.mybatis.core.op.DeleteAbsolute;
import cn.lngaosu.lwyd.framework.mybatis.core.op.DeleteAbsoluteById;
import cn.lngaosu.lwyd.framework.mybatis.core.op.DeleteAbsoluteByIds;
import org.apache.ibatis.session.Configuration;

import java.util.List;

/**
 * 自定义操作配置
 */
public class MpSqlInjector extends DefaultSqlInjector {
    @Override
    public List<AbstractMethod> getMethodList(Configuration configuration, Class<?> mapperClass, TableInfo tableInfo) {
        List<AbstractMethod> methodList = super.getMethodList(configuration, mapperClass, tableInfo);
        methodList.add(new DeleteAbsoluteById("deleteAbsoluteById"));
        methodList.add(new DeleteAbsoluteByIds("deleteAbsoluteByIds"));
        methodList.add(new DeleteAbsolute("deleteAbsolute"));
//        methodList.add(new DeleteById("deleteById"));
//        methodList.add(new DeleteByIds("deleteByIds"));
        return methodList;
    }
}
